package com.a.a.a.b;

import com.a.a.a.a.c.c.i;
import com.a.a.a.b.a.a.b;
import com.a.a.a.b.a.b.C;
import com.a.a.a.b.a.b.F;
import com.a.a.a.b.a.b.H;
import com.a.a.a.b.a.b.P;
import com.a.a.a.b.a.b.d;
import com.a.a.a.b.a.b.g;
import com.a.a.a.b.a.b.j;
import com.a.a.a.b.a.b.l;
import com.a.a.a.b.a.b.o;
import com.a.a.a.b.a.b.s;
import com.a.a.a.b.a.b.x;
import com.a.a.a.b.a.b.z;
import java.sql.SQLSyntaxErrorException;
import java.util.HashMap;
import java.util.Map;

public final class a
{
  private static final Map<String, c> a = new HashMap();
  
  private static boolean a(com.a.a.a.a.c.a parama)
  {
    return true;
  }
  
  public static String a(Exception paramException, b paramb, String paramString)
  {
    StringBuilder localStringBuilder = new StringBuilder("You have an error in your SQL syntax; Error occurs around this fragment: ");
    int i = paramb.c();
    int j = i - 16;
    if (j < 0) {
      j = 0;
    }
    int k = i + 9;
    if (k >= paramString.length()) {
      k = paramString.length() - 1;
    }
    String str = paramString.substring(j, k + 1);
    localStringBuilder.append('{').append(str).append('}');
    if (paramException != null) {
      localStringBuilder.append(". Error cause: " + paramException.getMessage());
    }
    return localStringBuilder.toString();
  }
  
  public static com.a.a.a.a.c.a a(String paramString1, b paramb, String paramString2)
  {
    try
    {
      Object localObject = null;
      boolean bool1 = true;
      F localF = new F(paramb, paramString2);
      boolean bool2 = false;
      switch (b.a[paramb.b().ordinal()])
      {
      case 1: 
        paramb.k();
        bool2 = true;
        break;
      }
      switch (b.a[paramb.b().ordinal()])
      {
      case 2: 
      case 3: 
        localObject = new d(paramb, localF).a();
        break;
      case 4: 
      case 5: 
        localObject = new z(paramb, localF).l();
        break;
      case 6: 
        localObject = new l(paramb, localF).a();
        break;
      case 7: 
        localObject = new o(paramb, localF).a();
        break;
      case 8: 
        localObject = new x(paramb, localF).a();
        break;
      case 9: 
        localObject = new C(paramb, localF).a();
        break;
      case 10: 
        localObject = new j(paramb, localF).a();
        break;
      case 11: 
        localObject = new d(paramb, localF).f();
        break;
      case 12: 
        localObject = new d(paramb, localF).e();
        break;
      case 13: 
        localObject = new d(paramb, localF).d();
        break;
      case 14: 
        localObject = new d(paramb, localF).b();
        break;
      case 15: 
        localObject = new d(paramb, localF).c();
        break;
      case 16: 
        localObject = new s(paramb, localF).a();
        break;
      case 17: 
      case 18: 
      case 19: 
      case 20: 
        localObject = new g(paramb, localF).b();
        bool1 = a((com.a.a.a.a.c.a)localObject);
        break;
      case 21: 
        localObject = new H(paramb).b();
        break;
      case 22: 
        c localc = null;
        if ((localc = (c)a.get(paramb.w())) != null) {
          switch (b.b[localc.ordinal()])
          {
          case 1: 
            localObject = new g(paramb, localF).a();
            break;
          case 2: 
            localObject = new H(paramb).a();
            break;
          case 3: 
            localObject = new H(paramb).c();
            break;
          case 4: 
            localObject = new P(paramb).a();
          }
        }
        break;
      }
      throw new SQLSyntaxErrorException("sql is not a supported statement");
      if (bool1)
      {
        while (paramb.b() == com.a.a.a.b.a.c.v) {
          paramb.k();
        }
        if (paramb.b() != com.a.a.a.b.a.c.a) {
          throw new SQLSyntaxErrorException(a(null, paramb, paramString1));
        }
      }
      if ((localObject instanceof i)) {
        ((i)localObject).a(bool2);
      }
      return localObject;
    }
    catch (Exception localException)
    {
      throw new SQLSyntaxErrorException(a(localException, paramb, paramString1), localException);
    }
  }
  
  public static com.a.a.a.a.c.a a(String paramString1, String paramString2)
  {
    return a(paramString1, new b(paramString1), paramString2);
  }
  
  public static com.a.a.a.a.c.a a(String paramString)
  {
    return a(paramString, "utf-8");
  }
  
  static
  {
    a.put("TRUNCATE", c.c);
    a.put("SAVEPOINT", c.b);
    a.put("ROLLBACK", c.a);
    a.put("RELOAD", c.d);
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.a.a.a.b.a
 * JD-Core Version:    0.7.0.1
 */